/*
 * Written by Anders Fongen
 * Norwegian Defence Research Establishment (FFI)
 * Email: anders@fongen.no
 */
package no.ffi.tpm.crypto;


import java.io.IOException;
import java.io.Serializable;

public class SignedObject implements Serializable {
     protected byte[] object;
    protected byte[] signature;
    
    public SignedObject(byte[] object, byte[] signature) {
        this.object = object;
        this.signature = signature;
    }
    
    public Serializable getObject() throws IOException {
        return CryptoOperations.deserialize(object);
    }
    
    public byte[] getObjectAsBytes() throws IOException {
        return object;
    }

    public byte[] getSignature() { return signature; }
        
    
}
